[WIP] Fix deploy to Vercel API error due to missing module#1126
[WIP] Fix deploy to Vercel API error due to missing module#1126
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- @libsql/client has platform-specific native binaries (@libsql/linux-x64-gnu) - Cannot be bundled - must be kept external and copied from pnpm virtual store - Update build-vercel.sh to copy @libsql scope from node_modules/.pnpm/node_modules - Update vercel.json includeFiles to include @libsql scope - Also fix @ai-sdk copy to use pnpm virtual store path Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/05489ac4-2d01-43c2-b9b3-e50ff9b92b03 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
|
@claude[agent] 10:27:17.171 |
- Add @libsql/client and better-sqlite3 as direct dependencies in apps/studio/package.json - Remove package copying logic from build-vercel.sh that caused infinite recursion - Vercel will install these packages automatically via pnpm install - Fixes build error: cp: cannot stat '../../node_modules/.pnpm/node_modules/@ai-sdk/react/react/react/...' - Update pnpm-lock.yaml Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/c8a7ff61-0ed4-46cc-ba58-56c1c0b9de42 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Fixed in 00abb3c. The infinite recursion was caused by trying to copy packages that are already direct dependencies. The solution is to add @libsql/client and better-sqlite3 as direct dependencies in package.json - Vercel will install them automatically, avoiding the cp -rL circular symlink issue. |
|
@claude[agent] 11:31:22.896 The framework produced an invalid deployment package for a Serverless Function. Typically this means that the framework produces files in symlinked directories. Please verify the framework settings. |
- Create apps/studio/.npmrc with node-linker=hoisted - Fixes "invalid deployment package for a Serverless Function" error - Prevents pnpm from creating symlinks that break Vercel packaging - Uses flat node_modules structure that Vercel can package correctly Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/415f5fd4-83fb-4626-ba67-7da11840f685 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Fixed in 884848d. Added .npmrc with node-linker=hoisted to apps/studio/. This configures pnpm to use a flat node_modules structure instead of symlinks, which Vercel can package correctly in serverless functions. |
|
@claude[agent] 部署到 vercel 使用 turso ,为什么需要 better-sqlite3 |
The TursoDriver supports three modes:
better-sqlite3 is a dependency of @objectstack/driver-turso (line 36 in package.json) because the driver extends SqlDriver to support local and replica modes. Even in remote-only deployments, the dependency must be present since TursoDriver's constructor initializes the SqlDriver base class. Vercel requires it as a direct dependency in apps/studio/package.json to properly bundle the native binaries. |
|
@claude[agent] resolve the merge conflicts in this pull request |
Resolve merge conflicts in pnpm-lock.yaml by regenerating the lockfile. This ensures all dependencies from both branches are properly included. Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Resolved in cedf380. The merge conflict was in pnpm-lock.yaml. I merged the main branch and regenerated the lockfile to ensure all dependencies from both branches are properly included. The branch is now up to date with main. |
|
@claude[agent] 从主分支更新最新代码,解决 fix-driver-turso-requirement |
Incorporates fix-driver-turso-requirement changes (commit 9f0712c): - Makes better-sqlite3 an optional peer dependency in driver-turso - Allows remote-only Vercel deployments without better-sqlite3 - Includes skills module structure refactoring - Updates CHANGELOG.md and documentation Resolves merge conflicts and regenerates pnpm-lock.yaml. Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
✅ 已成功从主分支合并最新代码 (commit 7ace0b2) 主要更新:
已解决合并冲突并重新生成了 pnpm-lock.yaml。 ✅ Successfully merged latest code from main branch (commit 7ace0b2) Key changes:
Merge conflicts resolved and pnpm-lock.yaml regenerated. |
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.